package com.yuexun.dhdoctor.module.personalPlan.adapter;

import android.widget.AbsListView;

import com.yuexun.dhdoctor.R;
import com.yuexun.dhdoctor.module.personalPlan.bean.OtherPlanBean;

import org.kymjs.kjframe.widget.AdapterHolder;
import org.kymjs.kjframe.widget.KJAdapter;

import java.util.Collection;

/**
 * Created by work-jx on 2016/9/8.
 */
public class OtherPlanAdapter extends KJAdapter<OtherPlanBean.DatasEntity> {

    public OtherPlanAdapter(AbsListView view, Collection<OtherPlanBean.DatasEntity> mDatas, int itemLayoutId) {
        super(view, mDatas, itemLayoutId);
    }

    @Override
    public void convert(AdapterHolder adapterHolder, OtherPlanBean.DatasEntity datasEntity, boolean b) {
        if(datasEntity != null && datasEntity.getFullName() != null){
            adapterHolder.setText(R.id.task_share_Name,datasEntity.getFullName());
        }
        if(datasEntity != null && datasEntity.getPosition() != null){
            adapterHolder.setText(R.id.task_share_position,datasEntity.getPosition());
        }
        if(datasEntity != null && datasEntity.getDepartment() != null){
            adapterHolder.setText(R.id.task_share_department,datasEntity.getDepartment());
        }
    }
}
